#!/usr/bin/env python3

def delWord(word, wordlist):
    while word in wordlist:
        wordlist.remove(word)

def main():
    s1 = "what is your is name"
    s2 = "ismy name is kyois"

    w1 = s1.split()
    w2 = s2.split()

    print(w1, w2)

    i = 0
    while i < len(w1):
        w = w1[i]
        if w in w2:
            delWord(w, w1)
            delWord(w, w2)
        i += 1

    print(' '.join(w1 + w2))


if __name__ == "__main__":
    main()
